package cn.hoichun.news.Mapper;

import cn.hoichun.news.Domain.Article;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author Hoichun
 */
@Mapper
public interface ArticleMapper {
    /**
     * @return 按id查找文章
     */
    Article getArticleById(int id);

    /**
     * @return 获取数据库里所有文章的数量
     */
    int getCountArticles();

    /**
     * @param wordList 查询词汇
     * @return list
     */
    List<Article> getArticlesBySearchWordLike(List<String> wordList);
//
//    List<MyMap> getArticleIdAndWordFreqBySearchWord(List<String> wordList);
//
//    List<MyMap> getFreqByWords(List<String> wordList);
//
//    List<MyMap> getValuesByIdWord(List<String> wordList,String orderMode);

//    int getArticleWordTotalCount();

    List<Article> getSumValueByWord(List<String> wordList,String orderMode,int size,int articleId);

    List<Article> getArticlesByFulltextIndex(String word);

    List<Integer> getRecommendArticleId(int articleId);

    String selectKeywordByArticleId(int articleId);
}